package popup;


import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextArea;
import javafx.scene.image.Image;
import javafx.stage.Stage;

/**
 *
 * @author Sawior
 */
public class PopupController {
    @FXML
    private Button popupOk;
    @FXML
    private TextArea textPopup;
    private Stage dialogStage;
    
    public void okAction(ActionEvent event) {
        dialogStage.close();
        
    }
    
    public void setDialogStage(Stage dialogStage) {
        this.dialogStage = dialogStage;
        this.dialogStage.getIcons().add(new Image("https://cdn1.iconfinder.com/data/icons/windows-8-metro-style/512/info.png"));
    }
    
    public Button getPopupOkButton() {
        return popupOk;
    }
    
    public void setPopupText(String text) {
        this.textPopup.setText(text);
    }
    
}
